<!DOCTYPE html>
<html lang="zh-CN">
    <head>
        <meta charset="UTF-8" />
        <title>24_CSS复合选择器-并集选择器</title>
        <style>
            /* (1) 标签和标签 */
            /* div,p {
                color: red;
            } */

            /* (2) 标签和id选择器 */
            /* div,#p1 {
                color: hotpink;
            } */

            /* (3) 标签和class选择器 */
            /* div,.p2 {
                color: skyblue;
            } */

            /* (4) id和class */
            #p1,.p2 {
                color: yellow;
            }
        </style>
    </head>
    <body>
        <div>1111</div>
        <div>2222</div>
        <p id="p1">3333</p>
        <p class="p2">4444</p>
    </body>
</html>